<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品管理后台</title>

    <link rel="stylesheet" href="/static/css/bootstrap.css">
        <!-- Bootstrap core CSS -->

</head>
<body>


<div class="container content">
  <h1>商品管理后台 <small> 欢迎 {{session.username}}</small>
    <a class="btn btn-success" href="/add_article" style="float:right"> 发布商品 </a>
  </h1>
  <hr>
  <table class="table">
    <tr>
      <th>ID</th>
      <th>商品名称</th>
      <th>商品价格</th>
      <th></th>
      <th></th>
    </tr>

    {% for one_product in products %}
      <tr>
        <td> {{ one_product.id}}</td>
        <td> {{ one_product.pname}}</td>
        <td> {{ one_product.new_price}}</td>
        <td><a href="#" class="btn btn-info" style="float:right">编辑</a></td>
        <td>
          <form action="#" method="post">
            <input type="hidden" name="_method" value="DELETE">
            <input type="submit" value="删除" class="btn btn-danger">
          </form>
        </td>
      </tr>
      {% endfor %}

  </table>
</div>
</body>
</html>